package com.hitqz.robot.api.business.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hitqz.robot.api.business.entity.TicketsEntity;
import com.hitqz.robot.api.business.enums.TicketsStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Date;

/**
 * @author xupkun
 * @date 2024/8/7
 */
public class TicketsVo {

    @Schema(description = "工单id")
    private Long id;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @Schema(description = "工单结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date finishTime;

    @Schema(description = "0--未执行 1-执行中 2-暂停中 3--停止 4-完成")
    private int status;

    @Schema(description = "状态字符串")
    private String statusStr;

    @Schema(description = "分配状态 20-未分配 21-已分配 22-处理中 23-已完结")
    private int allotStatus;

    @Schema(description = "分配状态")
    private String allotStatusStr;

    @Schema(description = "分配的机器人/agv的sn")
    private String allotRobotSn;

    @Schema(description = "分配的机器人/agv名称")
    private String allotRobotName;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusStr() {
        return TicketsStatusEnum.CMD_TICKETS_STATUS.get(status).getDesc();
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }


    public int getAllotStatus() {
        return allotStatus;
    }

    public void setAllotStatus(int allotStatus) {
        this.allotStatus = allotStatus;
    }

    public String getAllotStatusStr() {
        return TicketsStatusEnum.CMD_TICKETS_STATUS.get(allotStatus).getDesc();
    }

    public void setAllotStatusStr(String allotStatusStr) {
        this.allotStatusStr = allotStatusStr;
    }

    public String getAllotRobotSn() {
        return allotRobotSn;
    }

    public void setAllotRobotSn(String allotRobotSn) {
        this.allotRobotSn = allotRobotSn;
    }

    public String getAllotRobotName() {
        return allotRobotName;
    }

    public void setAllotRobotName(String allotRobotName) {
        this.allotRobotName = allotRobotName;
    }
}
